function toPersonel(id) {
	let userId = uni.getStorageSync('userId');
	if (id == userId) {
		uni.switchTab({
			url: '/pages/my/index'
		})
	} else {
		uni.navigateTo({
			url: '/pages/my/personal?id=' + id
		});
	}


}

function goBack() {
	uni.navigateBack({
		delta: 1
	});
}

function toUserChat(userId, name) {
	uni.navigateTo({
		url: '/pages/index/advisory?user_id=' + userId + '&username=' + name
	});

}

function toProduct(id) {
	uni.navigateTo({
		url: '/pages/index/product?id=' + id
	});

}

function toChat(id) {
	console.log("前往聊天页面", id)
	uni.navigateTo({
		url: '/pages/index/advisory?user_id=' + id
	});

}
export default {
	toPersonel,
	toProduct,
	toChat,
	goBack,
	toUserChat
}